package com.qf.common.pay.service;


import com.qf.common.pay.dto.PayDTO;
import com.qf.common.pay.param.FinishPayParam;
import com.qf.common.pay.param.PayParam;
import com.qf.common.pay.param.RefundParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.function.Consumer;

/**
 * @Classname PayService
 * @Description TODO
 * @Date 2025-06-03 11:32
 * @Created by 老任与码
 */
public interface PayService {
    String createPay(PayDTO payDTO);

    void notify(HttpServletRequest request, HttpServletResponse response, Consumer<FinishPayParam> consumer);

    void closePay(String outTradeNo);

    /**
     * 查询交易订单支付状态
     *
     * @param outTradeNo
     * @return tradeNo
     */
    String payStatus(String outTradeNo);

    void returnNotify(HttpServletRequest request, HttpServletResponse response,Consumer<FinishPayParam> consumer);

    String refundOrder(RefundParam refundParam);
}
